package com.laan.bmagame;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

public class LaanMain extends Activity {
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        GV.Instancies.background = (Background) findViewById(R.id.main_background);
        
        ImageButton btn_play = (ImageButton) findViewById(R.id.main_play);
		btn_play.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent i = new Intent("com.laan.bmagame.LAANGAME");
				startActivity(i);
			}
		});
	}

	@Override
	protected void onPause() {
		GV.Instancies.background.stopthread();
		super.onPause();
	}

	@Override
	protected void onResume() {
		GV.Instancies.background.startthread();
		super.onResume();
	}
	
	@Override
	public void onBackPressed() {
		finish();
		//activity transition animation
		super.onBackPressed();
	}
}